package scsc.pub.data;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;


/** @author Hibernate CodeGenerator */
public class GrouprightPK implements Serializable {

    /** identifier field */
    private String groupcode;

    /** identifier field */
    private String transcode;

    /** full constructor */
    public GrouprightPK(String groupcode, String transcode) {
        this.groupcode = groupcode;
        this.transcode = transcode;
    }

    /** default constructor */
    public GrouprightPK() {
    }

    /** 
     *                @hibernate.property
     *                 column="GROUPCODE"
     *                 length="8"
     *             
     */
    public String getGroupcode() {
        return this.groupcode;
    }

    public void setGroupcode(String groupcode) {
        this.groupcode = groupcode;
    }

    /** 
     *                @hibernate.property
     *                 column="TRANSCODE"
     *                 length="8"
     *             
     */
    public String getTranscode() {
        return this.transcode;
    }

    public void setTranscode(String transcode) {
        this.transcode = transcode;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("groupcode", getGroupcode())
            .append("transcode", getTranscode())
            .toString();
    }

    public boolean equals(Object other) {
        if ( (this == other ) ) return true;
        if ( !(other instanceof GrouprightPK) ) return false;
        GrouprightPK castOther = (GrouprightPK) other;
        return new EqualsBuilder()
            .append(this.getGroupcode(), castOther.getGroupcode())
            .append(this.getTranscode(), castOther.getTranscode())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getGroupcode())
            .append(getTranscode())
            .toHashCode();
    }

}
